<?php

class Profile extends CI_Controller{
	
	public function _construct(){
		parrent::_construct();
	}

	public function index(){	    
	    $temp = "";
	    $this->load->model("backend/Mprofile");	    
	    $temp['user'] = $this->Mprofile->listall();	   
		$temp['title'] = 'Hệ thống tuyển dụng và đào tạo';
        $temp['template']='backend/profile';                         
        $this->load->view("backend/layout/default", $temp);		
	}

	public function update(){		
		$ip_username = $this->input->post('ip_username');
		$ip_email = $this->input->post('ip_email');
		$ip_pass = $this->input->post('ip_pass');
		$ip_passnew = $this->input->post('ip_passnew');
		$ip_passrep = $this->input->post('ip_passrep');
		$ip_fullname = $this->input->post('ip_fullname');
		$ip_address = $this->input->post('ip_address');		
		$params = array(
          'username' => $ip_username,
          'email' =>  $ip_email,
          'password' =>  $ip_pass,
          'fullname' => $ip_fullname,
          'address' => $ip_address
        );		
		$this->load->model("backend/Mprofile");	    
 		$result = $this->Mprofile->update($params);
 		var_dump($result);die;
 		$this->load->view("backend/profile", $result);
		
	}


}